x86/shadow: slightly consolidate sh_unshadow_for_p2m_change() (part I)
authorJan Beulich <jbeulich@suse.com>
Thu, 18 Aug 2022 07:28:05 +0000 (09:28 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 18 Aug 2022 07:28:05 +0000 (09:28 +0200)
commit0caf699e69d79f54b94191e2f84956713c4be0da
tree836b2e785ebd63da11119886f7ca9ecf259b6310
parent62ca138c2c052187783aca3957d3f47c4dcfd683
x86/shadow: slightly consolidate sh_unshadow_for_p2m_change() (part I)

Replace a p2m_is_ram() check in the 2M case by an explicit _PAGE_PRESENT
one, to make more obvious that the subsequent l1e_get_mfn() actually
retrieves something that really is an MFN. It doesn't really matter
whether it's RAM, as the subsequent comparison with the original MFN is
going to lead to zapping of everything except the "same MFN again" case.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/hvm.c